import { Button, Result } from 'antd';
import classNames from 'classnames/bind';
import { useNavigate } from 'react-router-dom';

import styles from './index.module.scss';

const cx = classNames.bind(styles);

const NotNetwork = () => {
  const navigate = useNavigate();
  const goHome = () => {
    navigate('/welcome');
  };
  return (
    <Result
      className={cx('error-page')}
      status="500"
      title="500"
      subTitle="Sorry, something went wrong."
      extra={
        <Button type="primary" onClick={goHome}>
          返回首页
        </Button>
      }
    />
  );
};

export default NotNetwork;
